Repository navigation
fix(slider): align tick highlight background with checked button style - #755
18202781743 merged 1 commit into
Conversation
Reviewer's GuideUIBind the slider tick HighlightPanel colors to checked-button tokens so its selected background matches checked transparent buttons.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Hi @zqq-dora. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Hey - I've found 3 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="qt6/src/qml/SliderTipItem.qml" line_range="72-74" />
<code_context>
active: highlight
- sourceComponent: HighlightPanel { }
+ sourceComponent: HighlightPanel {
+ backgroundColor: DS.Style.checkedButton.background
+ outerShadowColor: DS.Style.checkedButton.dropShadow
+ innerShadowColor: DS.Style.checkedButton.innerShadow
+ }
}
</code_context>
<issue_to_address>
**Highlight differs from flat buttons**
When a highlighted slider tick is compared with a checked `ToolButton`, an active tick uses `DS.Style.checkedButton` palettes, while `ToolButton` is flat and uses `DS.Style.toolButton.checkedBackground` and `checkedShadow` when checked. The tick highlight therefore does not match the checked appearance of those flat buttons.
Use the same checked palette tokens as the flat button style the tick is meant to match.
</issue_to_address>
### Comment 2
<location path="qt6/src/qml/SliderTipItem.qml" line_range="73-74" />
<code_context>
- sourceComponent: HighlightPanel { }
+ sourceComponent: HighlightPanel {
+ backgroundColor: DS.Style.checkedButton.background
+ outerShadowColor: DS.Style.checkedButton.dropShadow
+ innerShadowColor: DS.Style.checkedButton.innerShadow
+ }
}
</code_context>
<issue_to_address>
**Selected tick misses button shading**
When the checked-button style has visible shadow layers, including in dark mode, `HighlightPanel.outerShadowColor` is not rendered because its `BoxShadow` is commented out, and the panel receives only `checkedButton.innerShadow`, not the checked button’s separate `innerShadow2`. The selected tick therefore lacks shading that the checked button renders, so the two appearances still differ.
Render the outer shadow and the checked style’s second inner-shadow layer in `HighlightPanel`, and bind the corresponding checked-button palettes.
</issue_to_address>
### Comment 3
<location path="qt6/src/qml/SliderTipItem.qml" line_range="72-75" />
<code_context>
active: highlight
- sourceComponent: HighlightPanel { }
+ sourceComponent: HighlightPanel {
+ backgroundColor: DS.Style.checkedButton.background
+ outerShadowColor: DS.Style.checkedButton.dropShadow
+ innerShadowColor: DS.Style.checkedButton.innerShadow
+ }
}
}
</code_context>
<issue_to_address>
**Selected tick corners remain larger**
When a highlighted tick is displayed, `HighlightPanel.radius` retains `DS.Style.highlightPanel.radius` (8), while checked buttons use `DS.Style.button.radius` (6). The selected tick therefore keeps visibly rounder corners instead of matching the checked button.
Set the `HighlightPanel` radius to the checked button radius.
</issue_to_address>| backgroundColor: DS.Style.checkedButton.background | ||
| outerShadowColor: DS.Style.checkedButton.dropShadow | ||
| innerShadowColor: DS.Style.checkedButton.innerShadow |
There was a problem hiding this comment.
🟡 Medium · Highlight differs from flat buttons
When a highlighted slider tick is compared with a checked ToolButton, an active tick uses DS.Style.checkedButton palettes, while ToolButton is flat and uses DS.Style.toolButton.checkedBackground and checkedShadow when checked. The tick highlight therefore does not match the checked appearance of those flat buttons.
Use the same checked palette tokens as the flat button style the tick is meant to match.
Prompt for AI agents
In `qt6/src/qml/SliderTipItem.qml` at lines 72-74:
**Highlight differs from flat buttons**
When a highlighted slider tick is compared with a checked `ToolButton`, an active tick uses `DS.Style.checkedButton` palettes, while `ToolButton` is flat and uses `DS.Style.toolButton.checkedBackground` and `checkedShadow` when checked. The tick highlight therefore does not match the checked appearance of those flat buttons.
Use the same checked palette tokens as the flat button style the tick is meant to match.| outerShadowColor: DS.Style.checkedButton.dropShadow | ||
| innerShadowColor: DS.Style.checkedButton.innerShadow |
There was a problem hiding this comment.
🟡 Medium · Selected tick misses button shading
When the checked-button style has visible shadow layers, including in dark mode, HighlightPanel.outerShadowColor is not rendered because its BoxShadow is commented out, and the panel receives only checkedButton.innerShadow, not the checked button’s separate innerShadow2. The selected tick therefore lacks shading that the checked button renders, so the two appearances still differ.
Render the outer shadow and the checked style’s second inner-shadow layer in HighlightPanel, and bind the corresponding checked-button palettes.
Prompt for AI agents
In `qt6/src/qml/SliderTipItem.qml` at lines 73-74:
**Selected tick misses button shading**
When the checked-button style has visible shadow layers, including in dark mode, `HighlightPanel.outerShadowColor` is not rendered because its `BoxShadow` is commented out, and the panel receives only `checkedButton.innerShadow`, not the checked button’s separate `innerShadow2`. The selected tick therefore lacks shading that the checked button renders, so the two appearances still differ.
Render the outer shadow and the checked style’s second inner-shadow layer in `HighlightPanel`, and bind the corresponding checked-button palettes.| backgroundColor: DS.Style.checkedButton.background | ||
| outerShadowColor: DS.Style.checkedButton.dropShadow | ||
| innerShadowColor: DS.Style.checkedButton.innerShadow | ||
| } |
There was a problem hiding this comment.
⚪ Low · Selected tick corners remain larger
When a highlighted tick is displayed, HighlightPanel.radius retains DS.Style.highlightPanel.radius (8), while checked buttons use DS.Style.button.radius (6). The selected tick therefore keeps visibly rounder corners instead of matching the checked button.
Set the HighlightPanel radius to the checked button radius.
Prompt for AI agents
In `qt6/src/qml/SliderTipItem.qml` at lines 72-75:
**Selected tick corners remain larger**
When a highlighted tick is displayed, `HighlightPanel.radius` retains `DS.Style.highlightPanel.radius` (8), while checked buttons use `DS.Style.button.radius` (6). The selected tick therefore keeps visibly rounder corners instead of matching the checked button.
Set the `HighlightPanel` radius to the checked button radius.388a092 to
54e8f62
Compare
|
slider-tick-highlight.png 这种示意图,放在pr里就行,也可以放在docs里,但不要放在src这种代码里,它不参与编译, |
The slider tick highlight background uses HighlightPanel with default highlightPanel.* color tokens, which differ from the checked button style. Bind the HighlightPanel color properties to checkedButton.* tokens so the tick selected background matches the transparent button checked appearance.
54e8f62 to
2c74e55
Compare
|
截图参考如下: @18202781743 已将截图从代码中移除,改为在评论中展示。 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, zqq-dora The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
7ea89aa
into
linuxdeepin:v25-flowstyle

Problem
Slider tick highlight background uses
HighlightPanelwith defaulthighlightPanel.*color tokens, which differ from the checked button style used by transparent (flat) buttons in checked state.Change
HighlightPanelcolor properties (backgroundColor,outerShadowColor,innerShadowColor) toDS.Style.checkedButton.*tokens inSliderTipItem.qml, so the tick selected background matches the transparent button's checked appearance.Files
qt6/src/qml/SliderTipItem.qml问题
Slider 刻度选中背景使用
HighlightPanel的默认highlightPanel.*颜色,与 transparent button 的 checked 样式不一致。修改
SliderTipItem.qml中将HighlightPanel的颜色属性绑定到DS.Style.checkedButton.*,使刻度选中背景与 checked 按钮样式一致。涉及文件
qt6/src/qml/SliderTipItem.qml